package inheritance;

public class Worker {
    private String name;
    private char gender;
    private int age;
    private int Worknum;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getWorknum() {
        return Worknum;
    }

    public void setWorknum(int worknum) {
        Worknum = worknum;
    }

    public void work(){
        System.out.println(getName()+"is working.");
    }

    public void eat(){
        System.out.println(getName()+"is eating.");
    }
}
